﻿/*----------------------------------------------------------------
    // Copyright (C) 2009 江苏华招网
    // 版权所有。 
    // 作者：周传雄 
    //
    // 文件名：DistributePlanList.cs
    // 文件功能描述：回款详情查看[未回款]
    // 创建标识：周传雄2009-05-12
    //
    // 修改标识：
    // 修改描述：
    //
    // 修改标识：
    // 修改描述：
    //
    // 审核人：
// 审核时间：
// 审核说明：
 //----------------------------------------------------------------*/
using System;
using System.Collections;
using System.Configuration;
using System.Data;

using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

using HZ.DrugTrade.Model;
using HZ.DrugTrade.IBLL;
using HZ.DrugTrade.BLLFactory;
using HZ.DrugTrade.Model.Enum;
using System.Collections.Generic;
using HZ.DrugTrade.Web;

namespace HZ.DrugTrade.Web.Enterprise.InvoiceManage
{
    public partial class RefundDetailPayNo : BasePage
    {
        public RefundDetailPayNo()
        {
            this.ModuleNo = Module.结算单管理.ToString();
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                QueryResult();
            }
        }
        /// <summary>
        /// 数据绑定
        /// </summary>
        private void QueryResult()
        {
            IList<Model.View.InvoicePay> lstInvoiceUnPay = new List<Model.View.InvoicePay>();
            Model.Query.InvoicePay qryCondition = new Model.Query.InvoicePay();
            User user = CurrentAccount.GetUser();
            qryCondition.CompanyID_PS = user.Org.OrgID;
            qryCondition.InvoiceID = txtInvoiceID.Text.ToString().Trim();
            qryCondition.HospitalName = txtHospitalname.Text.ToString().Trim();            
            //AspNetPager1.PageSize = Constants.GRIDVIEW_PAGE_SIZE;
            int totalCount = 0;
            IBLL_Purchase iPurchase = Factory.BLL_Purchase();
            lstInvoiceUnPay = iPurchase.GetInvoiceNoPayByWhere(qryCondition, AspNetPager1.CurrentPageIndex, AspNetPager1.PageSize, out totalCount);
            AspNetPager1.RecordCount = totalCount;
            gvwunpay.DataSource = lstInvoiceUnPay;
            gvwunpay.DataBind();
        }
        protected void AspNetPager1_OnPageChanged(object sender, EventArgs e)
        {
            QueryResult();
        }

        protected void btnQuery_Click(object sender, EventArgs e)
        {
            QueryResult();
        }



    }
}
